﻿@model ERCS.ViewModel.HomeVMs.LoginVM


@{
  Layout = null;
}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="/jquery.min.js"></script>
    <link rel="stylesheet" href="~/sitecss/logincss.css">
    <title>ERCS</title>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#verify_code_img').attr('src', '/_framework/GetVerifyCode?id=' + Math.random());
            $("input[name='VerifyCode']").attr('autocomplete', 'off');
        });
        function verify() {
            $('#verify_code_img').attr('src', '/_framework/GetVerifyCode?id=' + Math.random());
        }

    </script>
</head>

<body class="loginBody">
    <div style="position:absolute; height:50%;background-color:red;left:0px;right:0px;top:0px; background: url(../images/login-bj.png) no-repeat top #9BBCF3;"></div>

    <div class="loginDiv" id="logindiv" style="visibility:hidden">
        <h4>
            疫情上报防控系统
        </h4>
        <form action="/Login/Login" method="post">
            <input type="hidden" name="Redirect" value="@Model.Redirect">
            <ul class="loginForm">
                <li>
                    <i><img src="~/images/icon-login04.png" /></i>
                    <input type="text" name="ITCode" placeholder="请输入用户名" class="login-input" autocomplete="off" value="@Model.ITCode">
                </li>
                <li>
                    <i style="width: 16px;"><img src="~/images/icon-login01.png" /></i>
                    <input type="password" name="Password" placeholder="请输入密码" class="login-input" value="@Model.Password">
                </li>
                <li>
                    <i><img src="~/images/icon-login03.png" /></i>
                    <input type="text" name="VerifyCode" placeholder="请输入验证码" class="login-input">
                    <p class="login-code">
                    </p>
                    <img class="login-codeImg" id="verify_code_img">
                    <i class="login-code"><img src="~/images/icon-login02.png" onclick="verify()" /></i>
                </li>
                <li>
                    <span class="login-error">@Model.MSD.GetFirstError()</span>
                    <button type="submit" class="login-button" style="cursor:pointer">登 录</button>
                </li>
            </ul>
        </form>
    </div>


</body>

</html>
<script>
    $(function () {
        var hgt = $(document).height();
        var top = (hgt - 490) / 2;
        if (top < 0) {
            top = 0;
        }
        $("#logindiv").css("margin-top", top);
        $("#logindiv").css("visibility", "visible");

        $(window).resize(function () {
            var hgt = $(document).height();
            var top = (hgt - 490) / 2;
            if (top < 0) {
                top = 0;
            }
            $("#logindiv").css("margin-top", top);

        });
    });
</script>